<?php
/**
 * Created by PhpStorm.
 * User: hp
 * Date: 2017/12/2
 * Time: 15:36
 */

namespace App\Modules\Channel\Services;

use App\Modules\Channel\Models\Channel;

class ChannelService
{
    /**
     * 根据渠道id获取渠道昵称
     * @param $id
     * @return string
     */
    static function getChannelNicknameById($id)
    {
        if (empty($id)) {
            return "";
        }
        $result = Channel::getChannelNicknameById($id);
        if (empty($result)) {
            return "";
        }
        return $result['nickname'];
    }
}